package com.qjl.shopping.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qjl.shopping.bean.Act;
import com.qjl.shopping.bean.Admin;
import com.qjl.shopping.bean.Game;
import com.qjl.shopping.dao.AdminMapper;
import com.qjl.shopping.dao.GameMapper;
import com.qjl.shopping.service.AdminService;
import com.qjl.shopping.service.GameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author liguanghui
 * @Date 2023/5/3
 */
@Service
public class GameServiceImpl extends ServiceImpl<GameMapper, Game> implements GameService {
    @Autowired
    private GameMapper gameMapper;
    @Override
    public Page<Game> selectPage(int pageNum, int pageSize) {
        Page<Game> page = new Page<>(pageNum,pageSize);
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.orderByDesc("game_id");
        Page<Game> gamePage = gameMapper.selectPage(page,queryWrapper);
        return gamePage;
    }
}
